/*


 */

package jas.http.server;

import java.net.Socket;

/**
 * Acts upon incoming network connections.
 */
public interface ConnectionHandler {
    /**
     * Called when an incoming connection is opened.
     * @param clientSocket socket to this connection.
     */
    public void handleConnection(Socket clientSocket);
    
    /**
     * Called when the connection handler is not needed anymore.
     * This should clean up, for example by freeing used ports.
     */
    void stop();
}
